package com.wxl.www.wxl.shiro.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wxl.www.wxl.shiro.entity.SysPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysPermissionMapper extends BaseMapper<SysPermission> {
    /**
     * 获取当前角色的菜单
     * @param id
     * @return
     */
    List<SysPermission> getMenuAll(@Param("id")String id);

    /**
     * 根据父类查询子类
     * @param id
     * @return
     */
    List<SysPermission> findByParentId(@Param("parentId") String id);

    /**
     * shiro获取权限
     * @param id
     * @return
     */
    List<SysPermission> findBySysRole(@Param("id") String id);

    List<Map<String ,Object>> getTreeMenuAll();

    List<Map<String ,Object>> findMenuByParentId(@Param("id") String id);

    List<SysPermission> findById(@Param("id")String id);

}
